package com.nec.recommend.utils;

import com.nec.recommend.consts.CacheGroupConst;
import com.nec.recommend.consts.TokenConst;
import org.apache.commons.lang3.StringUtils;

public class RedisKeyUtil {
    public static String getAuthKey(String client, String token) {
        return (StringUtils.equals(client, TokenConst.MANAGE) ? CacheGroupConst.MANAGE_USER_SESSION : CacheGroupConst.WEAPP_USER_SESSION) + token.replaceAll(TokenConst.TOKEN_PREFIX, "");
    }
}
